package test10;

public class ElectricityChargeLackRain extends ElectricityCharge{
    public ElectricityChargeLackRain(double kilowatt){
        super(kilowatt);

    }

    @Override
    public double getKil() {
        if(kilowatt<=150){
            return kilowatt*3.5;
        }else {
            return (kilowatt-150)*3.5*1.1+525;
        }
    }

    @Override
    public void showKlowatt() {
        super.showKlowatt();
        System.out.println("这个月处于枯水期，每度为3.5元，如用电量超150度，则超出部分多收10%。所以本月的电费是： "+getKil());
        System.out.println();

    }
}
